﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for PhanHoi
/// </summary>
public class EPhanHoi
{
    private int maPH;
    private int maSP;
    private string noiDung;
    private string daKiemTra;
    private string email;
    private string tinhtrang;
    public EPhanHoi()
    { }
    public EPhanHoi(int maPH, int maSP, string noiDung, string daKiemTra, string email, string tinhtrang)
    {
        this.maPH = maPH;
        this.maSP = maSP;
        this.noiDung = noiDung;
        this.daKiemTra = daKiemTra;
        this.email = email;
        this.tinhtrang = tinhtrang;
    }
    public int MaPH
    {
        get { return this.maPH; }
        set
        {
            if (value == null)
                throw new Exception("maPH not allow nullvalue.");
            this.maPH = value;
        }
    }
    public int MaSP
    {
        get { return this.maSP; }
        set
        {
            if (value == null)
                throw new Exception("maSP not allow nullvalue.");
            this.maSP = value;
        }
    }
    public string NoiDung
    {
        get { return this.noiDung; }
        set { this.noiDung = value; }
    }
    public string DaKiemTra
    {
        get { return this.daKiemTra; }
        set { this.daKiemTra = value; }
    }
    public string Email
    {
        get { return this.email; }
        set { this.email = value; }
    }
    public string Tinhtrang
    {
        get { return this.tinhtrang; }
        set { this.tinhtrang = value; }
    }
    public override string ToString()
    {
        return this.maPH + "; " + this.maSP + "; " + this.noiDung + "; " + this.daKiemTra + "; " + this.email + "; " + this.tinhtrang + "; ";
    }
    public override bool Equals(Object obj)
    {
        EPhanHoi me = (EPhanHoi)obj;
        bool ret = this.MaPH.Equals(me.MaPH) && this.MaSP.Equals(me.MaSP);
        return ret;
    }
    public override int GetHashCode()
    {
        return this.MaPH.GetHashCode() + this.MaSP.GetHashCode();
    }

}